using UnityEngine;
using System.Collections;

public class RestartButton : MonoBehaviour 
{
	void Start()
	{
		//Set the colour of the button
		guiText.material.color = Color.red;
	}
	
	void OnMouseOver()
	{
		//Set the colour of the button
		guiText.material.color = Color.green;
		
		//If the mouse button has been pressed
		if(Input.GetMouseButtonDown(0))
		{
			//Re-load the game scene
			Application.LoadLevel("Game");
		}
	}
	
	void OnMouseExit()
	{
		//Set the colour of the button
		guiText.material.color = Color.red;
	}
}
